<HTML><HEAD><TITLE>insert(+Tree0, ++Key, ?Value, -Tree)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">library(m_tree234)</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>insert(+Tree0, ++Key, ?Value, -Tree)</H1>
Insert a key/value pair into a tree, failing if the key already exists.
<DL>
<DT><EM>Tree0</EM></DT>
<DD>A 2-3-4 tree
</DD>
<DT><EM>Key</EM></DT>
<DD>A key to insert
</DD>
<DT><EM>Value</EM></DT>
<DD>The value corresponding to Key
</DD>
<DT><EM>Tree</EM></DT>
<DD>The tree after insertion
</DD>
</DL>
<H2>Description</H2>
	<P>
	This predicate inserts the key Key with corresponding value Value
	into the tree Tree0, resulting in the tree Tree.  If the key Key is
	already in the tree, then the predicate fails.
	</P>
	<P>
	This predicate should only be called with trees created by other
	predicates from the tree234 module.
	</P>
	
<H3>Fail Conditions</H3>
Fails if Key already appears in Tree0.
<H3>Resatisfiable</H3>
no
<H2>See Also</H2>
<A HREF="../../lib_public/m_tree234/update-4.html">update / 4</A>, <A HREF="../../lib_public/m_tree234/set-4.html">set / 4</A>
</BODY></HTML>
